<!-- v-model修饰符
v-model.trim -> 去除首尾空格
v-model.number -> 转数字 -->
<div id="app">
    <h3>v-model修饰符 .trim .number</h3>
    姓名:<input v-model.trim="username" type="text"><br>
    年纪:<input v-model.number="age" type="text"><br>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js"></script>

<script>
    const app = new Vue({
        el: '#app',
        data: {
            username: '',
            age: ''
        },
        methods: {

        },
    })
</script>